<?php
/*
 +----------------------------------------------------------------------
 | TEMMOKUMVC [ NO BEST, ONLY BETTER ]
 +----------------------------------------------------------------------
 | Copyright (c) 2018~2019 https://www.temmoku.cn All rights reserved.
 +----------------------------------------------------------------------
 | Author: 张宗强 Email:webmaster@temmoku.cn QQ:158726877 516669373 TEL:17895221001 微信:temmokumvc
 +---------------------------------------------------------------------- 
*/
namespace plugin\wechat\Admin\Model;
use \temmoku\db;
class index {
	public function setting(){
		foreach($_POST['wechat'] AS $key=>$name){
			$one=db::select('*')->from(P_jab."set")->where("u_key LIKE '$key' ")->row();
			if($one){
				db::update(P_jab."set")->cols(array('u_value'))->where("u_key LIKE '$key'")->bindValue('u_value', "$name")->query();
			}else{
				db::insert(P_jab."set")->cols(array('u_key'=>"$key",'u_value'=>"$name"))->query();
			}
		}
	}
}
?>